import { createSlice } from '@reduxjs/toolkit';

export const userSlice=createSlice({
    name:'user',
    initialState:{
        userData:{}
    },
    reducers:{
        setUserData:(state,action)=>{
            // console.log('payload',action.payload)
            state.userData=action.payload
        }
    }
})

export const {setUserData}=userSlice.actions
export default userSlice.reducer